package ch02.test01;

import java.util.Random;

/**
 * @author lwj
 * @date 2025-03-07
 * @vesion 1.0.0
 */
public class ColorThread extends Thread{
    // 构造方法
    public ColorThread(){}
    public ColorThread(String color){
        // setName(color);
        super(color);
    }
    @Override
    public void run() {
        // System.out.println(this.color+":"+new Random().nextInt(255));
        System.out.println(Thread.currentThread().getName()+":"+new Random().nextInt(255));
    }
}